home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.text;
-
- import javax.swing.undo.AbstractUndoableEdit;
- import javax.swing.undo.CannotRedoException;
- import javax.swing.undo.CannotUndoException;
-
- class DefaultStyledDocument$StyleChangeUndoableEdit extends AbstractUndoableEdit {
- protected AbstractDocument.AbstractElement element;
- protected Style newStyle;
- protected AttributeSet oldStyle;
-
- public DefaultStyledDocument$StyleChangeUndoableEdit(AbstractDocument.AbstractElement var1, Style var2) {
- this.element = var1;
- this.newStyle = var2;
- this.oldStyle = var1.getResolveParent();
- }
-
- public void redo() throws CannotRedoException {
- super.redo();
- this.element.setResolveParent(this.newStyle);
- }
-
- public void undo() throws CannotUndoException {
- super.undo();
- this.element.setResolveParent(this.oldStyle);
- }
- }
-